<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>jQuery简单的选择器</title>
	<script type="text/javascript" src="../js/jquery.js"></script>
	<script type="text/javascript">
	$(document).ready(function(){
		$("#button1").click(function(){
			$("div span.num").css("color","#FF0033")
		});
		$("#button2").click(function(){
			$("div>span").css("color","#FF0033")
		});
		$("#button3").click(function(){
			$("p+span").css("color","#FF0033")
		});
		$("#button4").click(function(){
			$("p~span").css("color","#FF0033")
		});
	});
	  </script>
</head>
<body>
	<h1>jQuery简单的选择器</h1>
	<div>javascript森林群规有<span class="num">120</span>个会员,其中管理员<span class="num">120</span>个；</div>
	<div>javascript森林群博客目前有<span>30</span>作者,<span>10</span>篇文章；</div>
	<p>我是愚人码头</p>
	<span>你叫什么名字呢？</span>
	<span>我爱javascript森林；<p>test<span>李威test，span中的span！！</span>test</p></span>
	  <span>以为森林里有我好好多的朋友；</span>
	  <span>欢迎你加入我们；</span>
	<div>
	  <input type="submit" name="button" id="button1" value="测试$('div span.num')" />
	  <input type="submit" name="button" id="button2" value="测试$('div/>span')" />
	  <input type="submit" name="button" id="button3" value="$('p+span')" />
	  <input type="submit" name="button" id="button4" value="测试$('p~span')" />
	</div>

</body>

</html>